package view.components;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridLayout;

import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.BevelBorder;

@SuppressWarnings("serial")
public class DialogStatusBar extends JPanel {

	private StatusPane message;
	
	public DialogStatusBar() {
		init();
	}
	
	public void init() {
		setLayout(new GridLayout(1,3,5,5));
		setBorder(BorderFactory.createLineBorder(Color.white));
		setBackground(Color.GRAY);

		message = new StatusPane("");
		
		add(message);
	}
	
	public void setMessageText(String text) {
		this.message.setText(text);
	}
	
	class StatusPane extends JLabel{
		public StatusPane(String text) {
			setText(text);
			setHorizontalAlignment(LEFT);
			setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
			setPreferredSize(new Dimension(200,25));			
		}
	}	
	
}
